home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / system-services.postinst < prev    next >
Encoding:
Text File  |  2007-03-11  |  953 b   |  47 lines

  1. #!/bin/sh -e
  2. # This script can be called in the following ways:
  3. #
  4. # After the package was installed:
  5. #    <postinst> configure <old-version>
  6. #
  7. #
  8. # If prerm fails during upgrade or fails on failed upgrade:
  9. #    <old-postinst> abort-upgrade <new-version>
  10. #
  11. # If prerm fails during deconfiguration of a package:
  12. #    <postinst> abort-deconfigure in-favour <new-package> <version>
  13. #               removing <old-package> <version>
  14. #
  15. # If prerm fails during replacement due to conflict:
  16. #    <postinst> abort-remove in-favour <new-package> <version>
  17.  
  18.  
  19. # Migrate changes to /etc/inittab to /etc/event.d
  20. migrate_inittab()
  21. {
  22.     if [ -f /etc/inittab ]; then
  23.         /usr/lib/upstart/migrate-inittab.pl
  24.     fi
  25. }
  26.  
  27.  
  28. case "$1" in
  29.     configure)
  30.     # On new installation, migrate /etc/inittab
  31.     if [ -z "$2" ]; then
  32.         migrate_inittab
  33.     fi
  34.     ;;
  35.  
  36.     abort-upgrade|abort-deconfigure|abort-remove)
  37.     ;;
  38.  
  39.     *)
  40.     echo "$0 called with unknown argument \`$1'" 1>&2
  41.     exit 1
  42.     ;;
  43. esac
  44.  
  45.  
  46. exit 0
  47.